package com.example.mqttledmenu;

public class Config {//使用单例模式进行全局配置
    public static String serverUrl = "https://android.nightowl.top/";
    public String user_id = "1";
    public String avatar = "";
    private static Config ApplicationConfig = new Config();

    //让构造函数为 private，这样该类就不会被实例化
    private Config() {
    }

    public static Config getInstance() {
        return ApplicationConfig;
    }

    public void setUserAvatar(String avatar) {
        this.avatar = avatar.replace("\"", "");
    }


    public void setUserId(String user_id) {
        this.user_id = user_id;
    }

    public String getUserId() {
        return user_id;
    }
}
